home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Questions & Answers / Q&A Common Mistakes / Debugging Session1 next >
Encoding:
Text File  |  1998-10-26  |  1.6 KB  |  79 lines  |  [TEXT/ScoM]

  1. >The following is a program I modified from Nigels tutorial. It complies fine,
  2. >but doesn't produce any tracks with note data.
  3.  
  4. Here is the corrected version.
  5.  
  6. (initdef)             ; <-- use this otherwise you may evaluate defsyms twice
  7. (defsym a '(b c))
  8. (defsym b '(b b a d))
  9. (defsym c '(c c d a = ))
  10. (defsym d '(a = = b c)) 
  11.  
  12. (setq mel1 (gen-notrans a 2))
  13.  
  14. (def-symbol
  15.    bass mel1
  16. )
  17.  
  18. ; error
  19. ; you define here tonality for instrument called 'tonals' - you don't have
  20. ; such instrument
  21. ;
  22. ;(def-tonality
  23. ;   tonals (activate-tonality (major c 4))
  24. ;)
  25.  
  26. ; correct
  27.  
  28. (def-tonality
  29.    bass (activate-tonality (major c 4))
  30. )
  31.  
  32. (def-length
  33.    bass '(1/4 1/4 1/8)
  34. )
  35.  
  36. (def-velocity
  37.    bass '(74 84 70 65 60 94 80 70)
  38. )
  39.  
  40. (def-zone
  41.    bass '(1/1 1/1 1/1 1/1)
  42. )
  43.  
  44. (def-channel
  45.    bass 1
  46. )
  47.  
  48. ; don't use this, it was replaced by midi tempo tracks
  49. ;(def-tempo 120
  50. ;   default '(120 121 122 123 122 121) 
  51. ;)
  52.  
  53. ; use midi tempo track
  54. ; if you want to change tempo more often define the tempo lets say in 1/16 and
  55. ; make them as much that their sum will be 4/1 and then define the values
  56. ; for each of these zones with def-tempo. Here the tempo change points
  57. ; will be the same as the tonality zone points.
  58.  
  59. (def-zone
  60.     tempo '(1/1 1/1 1/1 1/1)
  61. )
  62.  
  63. (def-tempo '(120 121 122 123))
  64.  
  65. (midiport :modem)
  66.  
  67. ; error: 
  68. ; you cannot use compile-song here, because you are not using timesheet
  69. ; it compiles empty song because it compiles zero instruments
  70. ;
  71. ; (compile-song "ccl;output:" 1/4 "atest1"
  72.  
  73. ; Instead you must use compile-instrument or the compile-instrument-p
  74. ; which plays back the results immediately.
  75.  
  76. (compile-instrument-p "ccl;output:" "my song"
  77.   bass
  78. )
  79.